import React from 'react'
import * as echarts from 'echarts'
import "../../../node_modules/echarts/map/js/china.js"
import './Pay.less'
export default class Pay extends React.Component {
    constructor() {
        super()

    }

    componentDidMount() {
        const piechart = echarts.init(document.getElementById('PieChartMain'))
        const linechart = echarts.init(document.getElementById('LineChartMain'))
        piechart.setOption({
            tooltip: {},
            legend: {
                data:['销量']
            },
            series: [
        {
            type: 'pie',
            radius : '30%',
            center: ['30%', '60%'],//饼图位置控制
            data: [1,2,3,4,5]
        }]
        })
        linechart.setOption({
            tooltip: {},
            legend: {
                data:['销量']
            },
            series: [
        {
            type: 'pie',
            radius : '30%',
            center: ['30%', '60%'],//饼图位置控制
            data: [1,2,3,4,5]
        }]
        })
    }

    render() {
        return (
            <div className="chartMain">
                <div id="LineChartMain" style={{width:'100%', height:'500px'}}></div>
                <div id="PieChartMain" style={{width:'50%', height:'500px'}}></div>
                <div id="PieChartMain" style={{width:'50%', height:'500px'}}></div>
            </div>
        )
    }
}